---------------------------------------------
-- 竞技场相关排行榜
-- 单人竞技场
---------------------------------------------

local Util = require("common.Util")
local BillboardDefine = require("billboard.BillboardDefine")
local BillboardDB = require("billboard.BillboardDB")
local JjcDB = require("jjc.JjcDB")
local RoleLogic = require("role.RoleLogic")

-- 单人竞技场
function loadJJCBoard()
	local board = BillboardDB.db[BillboardDefine.TYPE_JJC]
	if not board then return end
	local rank2data = board.rank2data
	for i = 1, BillboardDefine.MAX_CNT do
		local jjcData = JjcDB.RANK_2_JJCDATA[i]
		if jjcData then
			local rankData = BillboardDB.initRankData(rank2data[i])
			rank2data[i] = rankData
			rankData.uuid = jjcData._id 
			rankData.value1 = jjcData.point
			if jjcData.monsterOutID then
				rankData.roleBase = {}
				RoleLogic.makeRoleBase(jjcData, rankData.roleBase, nil, true)
			end
		else
			rank2data[i] = nil
		end
	end
	Util.copyTableSimple(JjcDB.UUID_2_RANK, board.uuid2rank)
end
